// TOWN DIALOGUE SCRIPT
//    Town 1: Dargoth

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice;

// *** Temple Guards ***
begintalknode 1;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Temple Guard";
	text1 = "The guard looks in your direction.";
	text2 = "_Please move along now._ the guard says.";
	text3 = "_Enjoy your stay and don't cause problems._ the guard says.";
	text4 = "The guard appears to be giving you the ol' evil eye.";
	text5 = "_Welcome to Dargoth visitor._ the guard says.";
	text6 = "The guard sizes you up, then looks away after determining you aren't a threat.";
	text7 = "_Stay out of trouble._ the guard says.";
	text8 = "_Make sure to visit the museum._ the guard says.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Monks (male) ***
begintalknode 2;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Monk";
	text1 = "The monk ignores you since he has taken a vow of silence.";
	action = END_TALK;

// *** Monks (female) ***
begintalknode 3;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Monk";
	text1 = "The monk ignores you since she has taken a vow of silence.";
	action = END_TALK;

// *** The Bishop ***
begintalknode 6;
	state = -1;
	personality = 106;
	nextstate = 7;
	condition = 1;
	question = "The Bishop";
	text1 = "A priest is busy within the temple proper.";
	text2 = "_I am The Bishop in the Temple of Narn._ he says as you get closer.";
	text3 = "_Can I help you with something?_ he asks.";
	text5 = "The Bishop pauses what he is working on as you approach.";
	text6 = "_Do you need my aid?_ he asks.";
	action = INTRO;

begintalknode 7;
	state = 7;
	personality = 106;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "_I give guidance and aid to the monks and guards of the Temple of Narn._ The Bishop replies.";
	text2 = "_I also aid those that need help, for a suitable donation._ The Bishop adds.";
	text3 = "The Bishop points to a donation bowl by the alter.";

begintalknode 8;
	state = 7;
	personality = 106;
	nextstate = -1;
	condition = 1;
	question = "Can I get some aid (100 coins)?";
	text1 = "The Bishop replies _The Temple requires at least a 100 coin donation first._";
	text3 = "The Bishop says _Return when you need aid._";
	text5 = "The Bishop kneels and prays for the injured.  In a flash, you feel your energy and strength returning.";
	code =
		clear_strings();
		if (coins_amount() < 100) 
			add_string(1);
		else if (run_select_a_pc(1) == FALSE)
			add_string(3);
		else {
			play_sound(24);
			add_string(5);
			restore_pc(get_selected_pc());
			change_coins(-100);
		}
	break;

begintalknode 9;
	state = 7;
	personality = 106;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "The Bishop returns to his task he was working on.";
	text2 = "_Stay safe and return if you need my aid._ The Bishop says.";
	action = END_TALK;

// *** James (inn) ***
begintalknode 16;
	state = -1;
	personality = 114;
	nextstate = 17;
	condition = 1;
	question = "James";
	text1 = "A man is waiting on patrons from behind the counter.";
	text2 = "He smiles at you at your approach _Hi all, I'm James._";
	text3 = "_Can I get you something?_ he asks.";
	text5 = "James turns to wait on you.";
	text6 = "_Whatcha need?_ he asks.";
	action = INTRO;
	code =
		set_flag(1, 5, FALSE);
	break;

begintalknode 17;
	state = 17;
	personality = 114;
	nextstate = -1;
	condition = 1;
	question = "What can you offer?";
	text1 = "James replies _I provide food, drink and a place to rest._";
	text2 = "_Just let me know if I can get something for you._";

begintalknode 18;
	state = 17;
	personality = 114;
	nextstate = -1;
	condition = 1;
	question = "Can I see your food menu?";
	text1 = "You finish ordering food from James.";
	code =
		begin_shop_mode("Rosewood Inn", "James provides a slew of tasty food for the hungry adventurer.  The prices are average.", 1, 3, -1);
	break;

begintalknode 19;
	state = 17;
	personality = 114;
	nextstate = 22;
	condition = 1;
	question = "I'd like a drink please.";
	text1 = "_A mug of ale is 3 coins, Ok?_ asks James.";
	text2 = "He awaits your reply.";
	code =
		set_flag(1, 5, TRUE);
	break;

begintalknode 20;
	state = 17;
	personality = 114;
	nextstate = -1;
	condition = (has_special_item(8) == 0);
	question = "Can I get a room (100 coins)?";
	text1 = "_Rooms are 100 coins and you don't have enough._ James says.";
	text3 = "James gives you a key _Both are open right now, take your pick._";
	code =
		clear_strings();
		if (coins_amount() < 100) 
			add_string(1);
		else {
			add_string(3);
			change_spec_item(8, 1);
			change_coins(-100);
			set_flag(1, 6, TRUE);
		}
	break;

begintalknode 21;
	state = 17;
	personality = 114;
	nextstate = -1;
	condition = 1;
	question = "I don't need anything now, thanks.";
	text1 = "James says _Ok, I'm here if you need something I have._";
	text2 = "He turns to the next patron to see if they want anything.";
	action = END_TALK;

begintalknode 22;
	state = 22;
	personality = 114;
	nextstate = -1;
	condition = (get_flag(1, 5) > 0);
	question = "No thanks, not right now.";
	text1 = "James picks up a glass and starts polishing it.";
	text2 = "_Let me know if you'd like something later_ he says.";
	code =
		set_flag(1, 5, FALSE);
	break;

begintalknode 23;
	state = 22;
	personality = 114;
	nextstate = -1;
	condition = (get_flag(1, 5) > 0);
	question = "Yes please, I'm thirsty.";
	text1 = "James serves you a big frosty mug of ale.";
	text3 = "_You don't have enough coins.  Come back when you do_ James adds.";
	text5 = "James smiles and says _Let me know if you want one later._";
	text7 = "James says _You are too drunk for me to serve.  Go sleep it off first._";
	code =
		set_flag(1, 5, FALSE);
		clear_strings();
		if (coins_amount() < 3)
			add_string(3);
		else if (run_select_a_pc(1) == 0)
			add_string(5);
		else {
			if (get_char_status(get_selected_pc(), 28) >= 20) {
				add_string(7);
			}
			else {
				play_sound(24);
				add_string(1);
				change_coins(-3);
				// make drunk
				set_char_status(get_selected_pc(), 28, 10, TRUE, FALSE);
			}
		}
	break;

// *** James (souvenir) ***
begintalknode 26;
	state = -1;
	personality = 121;
	nextstate = 27;
	condition = 1;
	question = "James";
	text1 = "A man is waiting on patrons from behind the counter.";
	text2 = "He smiles at you at your approach _Hi all, I'm James._";
	text3 = "_Can I get you something?_ he asks.";
	text5 = "James turns to wait on you.";
	text6 = "_Whatcha need?_ he asks.";
	action = INTRO;

begintalknode 27;
	state = 27;
	personality = 121;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "James says _I run the souvenir shop for the Staff of Turin museum._";
	text2 = "_The museum is right next door._ he adds pointing to the east.";
	text3 = "_Can I show you some of our fine gifts?_ he asks.";

begintalknode 28;
	state = 27;
	personality = 121;
	nextstate = -1;
	condition = 1;
	question = "Let me see the souvenirs.";
	text1 = "You finish looking over the souvenirs.";
	code =
		begin_shop_mode("Souvenirs", "James has a bunch of souvenirs available for the hapless tourist.  Prices aren't bad.", 0, 2, -1);
	break;

begintalknode 29;
	state = 27;
	personality = 121;
	nextstate = -1;
	condition = 1;
	question = "Are there many tourists through here?";
	text1 = "James frowns some and replies _Not really, just a few here and there, much like yourselves._";
	text2 = "_The Wilderness is kinda dangerous right now without the protection of the Staff._ he explains.";
	text3 = "_If we had the staff back, things would definitely pick up._ he adds.";

begintalknode 30;
	state = 27;
	personality = 121;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "James smiles and waves _See ya later._";
	text2 = "_Come back if you need something to remember your trip with._";
	action = END_TALK;

// *** Jamie (souvenir) ***
begintalknode 36;
	state = -1;
	personality = 122;
	nextstate = 37;
	condition = 1;
	question = "Jamie";
	text1 = "A woman is busy restocking shelves and racks with knickknacks.";
	text2 = "She stops as you approach and says _Hello, I'm Jamie._";
	text3 = "_If you want to buy something, you'll need to talk to my husband._ she adds.";
	text5 = "Jamie stops what she is doing.";
	text6 = "_Hello again._ she says.";
	action = INTRO;

begintalknode 37;
	state = 37;
	personality = 122;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Jamie replies _I help out my husband with the souvenir shop._";
	text2 = "_Mainly restock items and keep things clean._ she adds.";
	text3 = "_If you'd like to buy something, you'll need to talk to my husband James._";

begintalknode 38;
	state = 37;
	personality = 122;
	nextstate = -1;
	condition = 1;
	question = "Why are there a lot of James?";
	text1 = "Jamie says _Because James was the one who warned us about Lagoth Zanta and his dastardly deed._";
	text2 = "Jamie looks serious _Without his warning, we'd have no hope of salvation._.";
	text3 = "She continues _Because of that, males born in Dargoth are all happy to carry his name._";

begintalknode 39;
	state = 37;
	personality = 122;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Don't forget to buy something to remember your visit with._ Jamie says.";
	action = END_TALK;

// *** James (museum) ***
begintalknode 46;
	state = -1;
	personality = 123;
	nextstate = 47;
	condition = 1;
	question = "James";
	text1 = "The man reading the book puts it aside as you get close.";
	text2 = "_Howdy folks._ he says _I'm James the Staff of Turin museum caretaker._";
	text3 = "_Feel free to look around and let me know if you have questions._";
	text5 = "_Well, welcome back._ James says.";
	text6 = "_Didn't get enough in your last visit heh?_ he asks, putting down a book he was reading.";
	action = INTRO;

begintalknode 47;
	state = 47;
	personality = 123;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "_I take care of the museum of the Staff of Turin._ James says.";
	text2 = "_I keep it clean and nice, one day to have the Staff back in the stand._ he says pointing to the stand in the middle of the room.";
	text3 = "_I also keep the boys room nice, in remembrance to the brave lad James, whom I'm named after._ he says proudly.";
	text4 = "_It's through the door over there._ James says pointing to the door leading deeper into the building.";

begintalknode 48;
	state = 47;
	personality = 123;
	nextstate = 50;
	condition = 1;
	question = "Who was James?";
	text1 = "_James is the reason we have hope._ James says almost sobbing _Without his warning, The Wilderness could be no more._";
	text2 = "James starts the tale he's told a million times before.";
	text3 = "_A while back, an archmage named Lagoth Zanta came to The Wilderness to steal our protective staff, the Staff of Turin._";
	text4 = "_He almost succeeded, were it not for little James, sleeping under the bed in that room._ he says pointing towards the other room.";
	text5 = "_Lagoth had managed to pull the guards away with a ruse, but didn't see James, who was awoken and slipped out the window._";
	text6 = "_He made his way to a group of guards who hadn't yet got on their way and raised the alarm of the theft in progress._";
	text7 = "_They slowed down Lagoth's escape long enough for more guards to return._";
	text8 = "_With the guards closing in, thanks to James, Lagoth broke up the staff and started running._";

begintalknode 49;
	state = 47;
	personality = 123;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "James waves at you and goes back to the book he was looking at before.";
	action = END_TALK;

begintalknode 50;
	state = 50;
	personality = 123;
	nextstate = 52;
	condition = 1;
	question = "Then what happened?";
	text1 = "James settles into his tale _Little James stayed here, but the rest who were able gave chase to that blackheart._";
	text2 = "_He was chased round and round The Wilderness, somehow hiding the pieces of the Staff of Turin._";
	text3 = "James looks a little happier _Since they are here somewhere, one day they'll be found and the staff restored._";
	text4 = "_That day, the people of The Wilderness will rejoice._";
	text5 = "_But without James, there'd be no hope because the staff would just be gone, vanished into the night._";
	text6 = "_Many have tried, but none have succeeded to find the pieces hidden by Lagoth before he was caught up to._";
	text7 = "_If he'd been stopped sooner_ James muses _The Wilderness would be a safe and happy place._";
	text8 = "_Perhaps you might want to give it a try and find the pieces of the staff._ he says.";

begintalknode 51;
	state = 50;
	personality = 123;
	nextstate = -1;
	condition = 1;
	question = "Interesting, but I have someplace to go?";
	text1 = "James looks a little sad you didn't want to listen to his story, but waves and says _Bye._";
	text2 = "He then returns to the engrossing book he was reading before.";
	action = END_TALK;

begintalknode 52;
	state = 52;
	personality = 123;
	nextstate = -1;
	condition = 1;
	question = "Any clues?";
	text1 = "_Well, there are rumors that Lagoth dispatched followers to hide the pieces amongst the villages of The Wilderness._";
	text2 = "_Some of his followers were trapped over by the graveyard here in Dargoth after Lagoth started running._ continues James.";
	text3 = "_But of course, that's as much as anybody knows._ James says.";
	text4 = "James adds _If found, the pieces may be able to be put together again at the Temple of Narn._";
	text5 = "_That's where it was created, though I've never heard what the process was to do it._";
	text6 = "_Someone will know, if the pieces are found._ James says.";

begintalknode 53;
	state = 52;
	personality = 123;
	nextstate = -1;
	condition = 1;
	question = "What happened to James?";
	text1 = "James says _Well he grew up, had a full life and passed away long ago._";
	text2 = "He's buried with the rest of the guardians of the staff over in the graveyard._ James adds pointing to the west.";

begintalknode 54;
	state = 52;
	personality = 123;
	nextstate = -1;
	condition = 1;
	question = "Hmmm, bye for now.";
	text1 = "James waves and says _Bye_ before going back to the book he was looking at.";
	action = END_TALK;

// *** Jamie (house) ***
begintalknode 56;
	state = -1;
	personality = 124;
	nextstate = 57;
	condition = 1;
	question = "Jamie";
	text1 = "A woman is busy with cooking in the house.  She seems a little startled that you're in there.";
	text2 = "She composes herself and says _Who are you and what do you want?_";
	text3 = "Her natural courtesy comes through and she adds _I'm Jamie by the way._";
	text4 = "_Though I'd prefer if you knocked before entering._ she says.";
	text5 = "_Back in again?_ Jamie asks.";
	text6 = "_Still haven't learned to knock yet I see._ she says.";
	action = INTRO;

begintalknode 57;
	state = 57;
	personality = 124;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "_When people aren't barging in and bothering me_ she says pointedly _I help out over at the Bishop's place._";
	text2 = "_I also help my husband James at the museum, when he needs help there._";
	text3 = "_Are you done bothering me, I got food to finish for both my husband and the Bishop?_";
	text4 = "Jamie looks at the door after finishing that statement.";

begintalknode 58;
	state = 57;
	personality = 124;
	nextstate = -1;
	condition = 1;
	question = "Sorry to bother you, bye.";
	text1 = "Jamie softens some _No problem this time, knock next time._ she says.";
	text2 = "_Goodbye._";
	action = END_TALK;
